<template>
  <div class="container_home">
    <div class="title-bar">
      <button id="minimize" @click="minimize">_</button>
      <button id="maximize" @click="maximize">□</button>
      <button style=" margin-right: 1.5vw" id="close" @click="close">×</button>
    </div>
   
    <div class="context">      
      <h1>{{State.getUserInfo}}</h1>
      <span style="color:red">首页</span>   
      
      <svg-icon icon-class="loading" width="30px" height="30px" color="red"/>
      <Spring></Spring>
      <button  @click="DefaultTheme('default')">默认主题</button>
      <button @click="DefaultTheme('light')">黑色主题</button>
      <button @click="handStrore">缓存</button>
    </div>
  </div>
</template>

<script setup lang="ts">
import user from "../../hooks/User/index"
let {minimize,maximize,close,handStrore,State}=user()
const DefaultTheme=(ping:string)=>{
  if(ping==="default"){
    window.document.documentElement.setAttribute('data-theme','dark');
  }else{
    window.document.documentElement.setAttribute('data-theme', 'light');
  }
  
}
</script>

<style scoped lang="scss">
@import "../../styles/global.scss";
@import "../../styles/home.scss";

</style>